package com.ease.platform.access.service.impl.authorization;

import java.util.List;
import java.util.Map;

import com.ease.common.vo.Ordering;
import com.ease.common.vo.Pagination;
import com.ease.model.Model;
import com.ease.model.criteria.CriteriaParameter;
import com.ease.platform.access.callback.BatchAccessCallback;
import com.ease.platform.access.service.AbstractParameterizedBeanIbatisAccessService;
import com.ease.platform.authorization.callback.AuthorizationCallback;
import com.ease.platform.common.service.impl.authorization.AbstractAuthorizationProxyServiceImpl;

/**
 * 
 * @author nathanleewei
 * 
 */
public abstract class AbstractParameterizedBeanIbatisAccessAuthorizationProxyServiceImpl<T extends Model, S extends AbstractParameterizedBeanIbatisAccessService<T>> extends
		AbstractAuthorizationProxyServiceImpl<AbstractParameterizedBeanIbatisAccessService<T>> implements AbstractParameterizedBeanIbatisAccessService<T> {

	public String getNamespace() {
		this.throwUnaccessibleException();
		return null;
	}

	public long sequence() {
		return this.invoke(new AuthorizationCallback() {

		}).sequence();
	}

	public T save(T model) {
		return this.invoke(new AuthorizationCallback() {

		}).save(model);
	}

	// public List<T> save(List<T> models) {
	// return this.invoke( new AuthorizationCallback() {
	//
	// }).save(models);
	// }

	public void save(List<T> models, BatchAccessCallback<T> batchAccessCallback) {
		this.invoke(new AuthorizationCallback() {

		}).save(models, batchAccessCallback);
	}

	public int create(List<T> models) {
		return this.invoke(new AuthorizationCallback() {

		}).create(models);
	}

	public List<T> findByIds(long[] ids) {
		return this.invoke(new AuthorizationCallback() {

		}).findByIds(ids);
	}

	public T findOne(String statement, CriteriaParameter parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).findOne(statement, parameter);
	}

	public T findOne(String statement, Map<String, Object> parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).findOne(statement, parameter);
	}

	public T findOne(CriteriaParameter parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).findOne(parameter);
	}

	public T findOne(Map<String, Object> parameter) {

		return this.invoke(new AuthorizationCallback() {

		}).findOne(parameter);
	}

	public List<T> find(String statement, Map<String, Object> parameter, Ordering ordering) {
		return this.invoke(new AuthorizationCallback() {

		}).find(statement, parameter, ordering);
	}

	public List<T> find(String statement, CriteriaParameter parameter, Ordering ordering) {
		return this.invoke(new AuthorizationCallback() {

		}).find(statement, parameter, ordering);
	}

	public List<T> find(Map<String, Object> parameter, Ordering ordering) {

		return this.invoke(new AuthorizationCallback() {

		}).find(parameter, ordering);
	}

	public List<T> find(CriteriaParameter parameter, Ordering ordering) {
		return this.invoke(new AuthorizationCallback() {

		}).find(parameter, ordering);
	}

	public List<T> find(String statement, Map<String, Object> parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).find(statement, parameter);
	}

	public List<T> find(String statement, CriteriaParameter parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).find(statement, parameter);
	}

	public List<T> find(Map<String, Object> parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).find(parameter);
	}

	public List<T> find(CriteriaParameter parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).find(parameter);
	}

	public Pagination<T> findPagination(String statement, Map<String, Object> parameter, Ordering ordering, Pagination<T> pagination) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(statement, parameter, ordering, pagination);
	}

	public Pagination<T> findPagination(String statement, CriteriaParameter parameter, Ordering ordering, Pagination<T> pagination) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(statement, parameter, ordering, pagination);
	}

	public Pagination<T> findPagination(Map<String, Object> parameter, Ordering ordering, Pagination<T> pagination) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(parameter, ordering, pagination);
	}

	// Added by honghui on 2011/06/29
	public Pagination<T> findPagination(Map<String, Object> parameter, Ordering ordering, final Pagination<T> pagination, int skipResult, int maxResult) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(parameter, ordering, pagination, skipResult, maxResult);
	}

	public Pagination<T> findPagination(CriteriaParameter parameter, Ordering ordering, Pagination<T> pagination) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(parameter, ordering, pagination);
	}

	// Added by honghui on 2011/06/29
	public Pagination<T> findPagination(CriteriaParameter parameter, Ordering ordering, final Pagination<T> pagination, int skipResult, int maxResult) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(parameter, ordering, pagination, skipResult, maxResult);
	}

	public Pagination<T> findPagination(Map<String, Object> parameter, Pagination<T> pagination) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(parameter, pagination);
	}

	public Pagination<T> findPagination(CriteriaParameter parameter, Pagination<T> pagination) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(parameter, pagination);
	}

	public Pagination<T> findPagination(Ordering ordering, Pagination<T> pagination) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(ordering, pagination);
	}

	public Pagination<T> findPagination(Pagination<T> pagination) {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination(pagination);
	}

	public Pagination<T> findPagination() {
		return this.invoke(new AuthorizationCallback() {

		}).findPagination();
	}

	public int count(String statement, Map<String, Object> parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).count(statement, parameter);
	}

	public int count(String statement, CriteriaParameter parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).count(statement, parameter);
	}

	public int remove(String statement, Map<String, Object> parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).remove(statement, parameter);
	}

	public int remove(String statement, CriteriaParameter parameter) {
		return this.invoke(new AuthorizationCallback() {

		}).remove(statement, parameter);
	}

	public List<T> find(String statement, Map<String, Object> parameters, int skipResult, int maxResult, Ordering ordering) {
		return this.invoke(new AuthorizationCallback() {

		}).find(statement, parameters, skipResult, maxResult, ordering);
	}

	public List<T> find(String statement, CriteriaParameter parameter, int skipResult, int maxResult, Ordering ordering) {
		return this.invoke(new AuthorizationCallback() {

		}).find(statement, parameter, skipResult, maxResult, ordering);
	}

	public List<T> find(Map<String, Object> parameters, int skipResult, int maxResult, Ordering ordering) {
		return this.invoke(new AuthorizationCallback() {

		}).find(parameters, skipResult, maxResult, ordering);
	}

	public List<T> find(CriteriaParameter parameter, int skipResult, int maxResult, Ordering ordering) {
		return this.invoke(new AuthorizationCallback() {

		}).find(parameter, skipResult, maxResult, ordering);
	}

	public List<T> find(Map<String, Object> parameters, int skipResult, int maxResult) {
		return this.invoke(new AuthorizationCallback() {

		}).find(parameters, skipResult, maxResult);
	}

	public List<T> find(CriteriaParameter parameter, int skipResult, int maxResult) {
		return this.invoke(new AuthorizationCallback() {

		}).find(parameter, skipResult, maxResult);
	}

	// public int remove(String statement, T model) {
	//
	// return this.invoke( new AuthorizationCallback() {
	//
	// }).remove(statement, model);
	// }

}
